package com.ls.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 例外号码表：默认短信网关，例外号码就走本机发送；
默认本机发送，例外号码就走短信网关。

会员生效，非会员都走本机
 * </p>
 *
 * @author pengyu
 * @since 2024-10-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ExceptPhone extends Model<ExceptPhone> {

    private static final long serialVersionUID=1L;

    /**
     * 自增主键
     */
    @TableId(value = "ex_id", type = IdType.AUTO)
    private Long exId;

    /**
     * 例外号码，只能是手机
     */
    private String exPhone;

    /**
     * 客户主键
     */
    private Long customerId;

    /**
     * 客户电话
     */
    private String customerPhone;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    public ExceptPhone(String exPhone, Long customerId, String customerPhone) {
        this.exPhone = exPhone;
        this.customerId = customerId;
        this.customerPhone = customerPhone;
        this.createTime = LocalDateTime.now();
    }

    @Override
    protected Serializable pkVal() {
        return this.exId;
    }

}
